home *** CD-ROM | disk | FTP | other *** search
- unit DrBob42_impl;
-
- {This file was generated on 31 Jan 2001 11:22:44 GMT by version 03.03.03.C1.06}
- {of the Inprise VisiBroker idl2pas CORBA IDL compiler. }
-
- {Please do not edit the contents of this file. You should instead edit and }
- {recompile the original IDL which was located in the file }
- {D:\usr\bob\magazine\DELPHI.MAG\#67\src\drbob42.idl. }
-
- {Delphi Pascal unit : DrBob42_impl }
- {derived from IDL module : DrBob42 }
-
-
- interface
- uses
- SysUtils,
- CORBA,
- DrBob42_i,
- DrBob42_c;
-
- type
- TAccounts = class;
-
- TAccounts = class(TInterfacedObject, DrBob42_i.Accounts)
- protected
- public
- constructor Create;
- procedure AccountArrayTest(const Accounts: DrBob42_i.AccountArray);
- procedure AccountSequenceTest(const Accounts: DrBob42_i.AccountSequence);
- end;
-
-
- implementation
- uses
- Dialogs;
-
- constructor TAccounts.Create;
- begin
- inherited
- end;
-
- procedure TAccounts.AccountArrayTest(const Accounts: DrBob42_i.AccountArray);
- var
- i: Integer;
- begin
- for i:=0 to 2 do
- begin
- if Accounts[i]._discriminator = normal then
- ShowMessage(Format('Normal Balance %d: %1.2f',
- [i+1,Accounts[i].accountN.balance]))
- else
- ShowMessage(Format('Savings Balance %d: %1.2f at %1.2f%%',
- [i+1,Accounts[i].accountS.balance,
- Accounts[i].accountS.rates.interest_rate]))
- end
- end;
-
- procedure TAccounts.AccountSequenceTest(const Accounts: DrBob42_i.AccountSequence);
- var
- i: Integer;
- begin
- for i:=0 to High(Accounts) do // use High on Open Array
- begin
- if Accounts[i]._discriminator = normal then
- ShowMessage(Format('Normal Balance %d: %1.2f',
- [i+1,Accounts[i].accountN.balance]))
- else
- ShowMessage(Format('Savings Balance %d: %1.2f at %1.2f%%',
- [i+1,Accounts[i].accountS.balance,
- Accounts[i].accountS.rates.interest_rate]))
- end
- end;
-
-
- initialization
-
- end.